package test.ribbon.client;

import com.netflix.loadbalancer.IPing;
import com.netflix.loadbalancer.Server;
import com.netflix.niws.client.http.HttpClientRequest;
import cn.hutool.http.HttpUtil;
public class MyPing implements IPing{

	@Override
	public boolean isAlive(Server server) {
		String url = "http://"+server.getHostPort();
		System.out.println("访问 "+url);
		try {
			String s = HttpUtil.get(url,1000);
		}catch (Exception e) {
			return false;
		}
		return true;
	}

}
